using System.Collections.Generic;

namespace Microformats.Readers.Interfaces
{
    public interface ICommonInformation
    {
        /// <summary>
        /// Specifies the datatype of the microformat as a whole.
        /// </summary>
        string DataType { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        string Name { get; set;}

        /// <summary>
        /// Specifies the fields that are held in this configuration element.
        /// </summary>
        List<ICommonInformation> Fields { get; }

        /// <summary>
        /// Gets or sets the plurality.
        /// </summary>
        /// <value>The plurality.</value>
        string Plurality
        {
            get;
            set;
        }

        /// <summary>
        /// Finds the field by name
        /// </summary>
        /// <param name="fieldName">Name of the field.</param>
        /// <returns></returns>
        ICommonInformation FindFieldByName(string fieldName);

        ICommonInformation ParentField { get;}

        /// <summary>
        /// The attribute in the xml/html that holds the value indicating a microformat is present.
        /// </summary>
        string RootType
        {
            get;
            set;
        }
    }
}